// delay 毫秒后执行resolve
function timerPromisefy (delay) {
    return new Promise (function (resolve) {
        setTimeout(() => {
            resolve(delay)
        }, delay);
    })
}
// 任何一个 promise 变为 resolve 或 reject 的话,程序就停止运行
Promise.race([
    timerPromisefy(1),
    timerPromisefy(32),
    timerPromisefy(64),
    timerPromisefy(128)
]).then(function (value) {
    console.log(value);
})